package cn.zhoutingrui.pethome.system.role.mapper;

import cn.zhoutingrui.pethome.system.menu.domain.Menu;
import cn.zhoutingrui.pethome.system.permission.domain.Permission;
import cn.zhoutingrui.pethome.system.role.domain.Role;
import cn.zhoutingrui.pethome.base.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author ztr
 * @since 2023-02-07
 */
public interface RoleMapper extends BaseMapper<Role> {
    List<Long> findByRole(Long id);

    void addRoleMenu(@Param("roleId")Long roleId,@Param("menuId")Long muenIds);
    void addRolePermission(@Param("roleId")Long roleId,@Param("permissionId")Long permissionId);
    List<Menu> findMenuByid(Long id);
    List<Permission> findPermissinByid(Long id);
    void deleteByRoleMenus(Long ids);
    void deleteByRolePermissions(Long ids);
    void deleteRoles(Long ids);
}
